<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //箭头函数在哪里使用：函数作为参数时
        //结论：箭头函数中的this引用的是最近作用域中的this;
        const obj={
            aaa(){
                setTimeout(() => {
                    console.log(this)//obj
                }, 0);
                setTimeout(function(){
                    console.log(this)//window
                });
            }
        }
        obj.aaa()
    </script>
</body>
</html>